home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
programming
/
other
/
esa
/
esa.readme
< prev
next >
Wrap
Text File
|
1999-04-19
|
1KB
|
37 lines
Short: Extended Syntax Assembly v1.8
Author: bevilacq@cli.di.unipi.it (Simone Bevilacqua)
Uploader: bevilacq@cli.di.unipi.it (Simone Bevilacqua)
Type: dev/asm
Requires: 020+ CPU, KS 2.0
Replaces: dev/asm/ESA.lha
Ever heard of "inline asm" inside C, Pascal, etc. ?
Well, here we have "inline C, Pascal, etc." inside asm!
Look below: that's a small sample of ESA code!!!
procedure CpyQtd{a1-a2},d0-d1/a1-a2
move.b (a1)+,d0 ;get "quote"
repeat
move.b (a1)+,d1
switch.s d1.b
-> d0 ;successful copy
clr.b (a1) ;NULL-termination
moveq.l #0,d1 ;exit loop
-> #0 ;unvalid char, exit loop
suba.l a1,a1 ;please, let it be...
-> #10 ;unvalid char
moveq.l #0,d1 ;exit loop
suba.l a1,a1 ;please, let it be...
def
move.b d1,(a2)+ ;copy char
eswitch
until.s ~d1.b
movea.l a1,a0 ;new string ptr
eproc